package
{
	import flash.display.Sprite;
	
	import sangpil.pv3d.RotatingEffect;
	import sangpil.pv3d.events.RotatingEvent;

	[SWF(width = 760, height = 405, frameRate = 30, backgroundColor = 0x000000)]
	public class rotationTest extends Sprite
	{
		private var tempArr:Array = [];
		private var tempEffect:RotatingEffect;
		public function rotationTest()
		{
			super();
			this.tempArr[0] = new tempRect01();
			this.tempArr[1] = new tempRect04();
			
			tempEffect = new RotatingEffect(this.tempArr[0], this.tempArr[1], this.tempArr[0].width, this.tempArr[0].height, 'right', 8, 2);
			tempEffect.addEventListener(RotatingEvent.COMPLETE, rotationEnd);
			this.addChild(tempEffect);
		}
		
		private function rotationEnd(e:RotatingEvent):void
		{
			trace('end rotation');
			this.removeChild(this.tempEffect);
			this.addChild(this.tempArr[1]);
		}
		
	}
}